﻿
@{
    ViewBag.Title = "OutpatientReg";
    Layout = "~/Views/Shared/_Index.cshtml";
}

<style type="text/css">
    .ckmargin {
        margin-right: 20px;
    }

    #btn_search {
        margin-left: 6px;
        width: 35px;
    }
</style>

<form name="form1">
    <div class="panel panel-default" style="margin-top:10px; margin-bottom: -3px;">
        <div class="panel-heading navb-bg">
            挂号
        </div>
        <div style="padding: 2px;padding-right:20px;">
            <table class="form">
                <tr>
                    <th class="formTitle">卡号：</th>
                    <td class="formValue">
                        <input type="text" id="txtpatid" hidden />
                        <input type="text" class="form-control " id="txtkh" placeholder="卡号" />
                    </td>
                    <td class="formValue" colspan="2">
                        <input type="button" id="btn_search" class="btn btn-default btn-md btn-default-color" value="搜索" />
                        <input type="button" class="btn btn-default btn-md" value="免卡挂号 " onclick="FreeCardReg()" />
                    </td>
                    <th class="formTitle"><span class="required">*</span>发票号：</th>
                    <td class="formValue">
                        <input type="text" class="form-control formClearIgnore newtouch_Readonly" id="txtfph" />
                    </td>
                    <td class="formValue" colspan="2">
                        <input type="button" class="btn btn-default btn-md" style="margin-left:6px;" value="选发票号" onclick="ShowInvoicePanel()" />
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">姓名：</th>
                    <td class="formValue">
                        <label id="labxm"></label>
                    </td>
                    <th class="formTitle" style="left:-78px;">性别：</th>
                    <td class="formValue" style="left:-78px;">
                        <label id="labxb"></label>
                    </td>
                    <th class="formTitle"><span class="required">*</span>病人性质：</th>
                    <td class="formValue">
                        <input type="text" class="form-control newtouch_Readonly" id="txtbrxzqc" />
                        <input type="text" id="txtbrxz" hidden />
                        <input type="text" id="txtbrxzbh" hidden />
                    </td>
                    <td class="formValue"></td>
                </tr>
                <tr>
                    <th class="formTitle">门诊类型：</th>
                    <td class="formValue formDdlSelectorTd">
                        <select id="sel_mzlx" class="form-control" onchange="sel_mzlxChange()">
                            <option value="1">普通门诊</option>
                            <option value="2">急诊</option>
                            <option value="3">专家门诊</option>
                        </select>
                        <input type="text" id="txtghlxbh" hidden />
                        <input type="text" id="txtghlx" hidden />
                    </td>
                    <th class="formTitle"></th>
                    <td class="formValue" style="left:-122px;" colspan="3">
                        <div class="ckbox ckmargin">
                            <input id="chk_ckf" type="checkbox" onclick="GHFees()" /><label for="chk_ckf">磁卡费</label>
                        </div>
                        <div class="ckbox ckmargin">
                            <input id="chk_gbf" type="checkbox" onclick="GHFees()" /><label for="chk_gbf">工本费</label>
                        </div>
                        <div class="ckbox ckmargin">
                            <input id="chk_zzjm" type="checkbox" onclick="GHFees()" /><label for="chk_zzjm">转诊减免</label>
                        </div>
                    </td>
                </tr>
                <tr>
                    <th class="formTitle"><span class="required">*</span>科室/医生：</th>
                    <td class="formValue">
                        <input type="text" class="form-control" id="txtksys" style="width:98%;" required />
                        <input type="text" id="txtksbh" hidden />
                        <input type="text" id="txtks" hidden />
                        <input type="text" id="txtrygh" hidden />
                        <input type="text" id="txtys" hidden />
                    </td>
                </tr>
                <tbody class="dispTbody" style="display:none;">
                    <tr>
                        <th class="formTitle">病历号：</th>
                        <td class="formValue">
                            <input type="text" class="form-control newtouch_Readonly" id="txtblh" />
                        </td>
                        <th class="formTitle">出生日期：</th>
                        <td class="formValue">
                            <input id="txtcsny" type="text" class="form-control input-wdatepicker newtouch_Readonly" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" />
                        </td>
                        <th class="formTitle">初复诊：</th>
                        <td class="formValue">
                            <input type="text" class="form-control newtouch_Readonly" id="txtcfz" />
                            <input type="text" id="txtfzbz" hidden />
                        </td>
                        <th class="formTitle">大病：</th>
                        <td class="formValue">
                            <input type="text" class="form-control newtouch_Readonly" id="txtdb" />
                        </td>
                    </tr>
                    <tr>
                        <th class="formTitle">大病诊断：</th>
                        <td class="formValue">
                            <input type="text" class="form-control newtouch_Readonly" id="txtdbzd" />
                        </td>
                    </tr>
                </tbody>
            </table>
            <div class="fa_icontoggle"><i class="fa fa-angle-double-down icontoggle" style="color:rgb(0, 160, 233);cursor:pointer;"></i></div>
        </div>
    </div>

    <div id="MyTabGrid" style="margin-top:10px;">
        <ul class="nav nav-tabs navb-bg" role="tablist" id="myTab">
            <li role="presentation" class="active"><a href="#registering" id="linkregistering" role="tab" data-toggle="tab">正在挂号</a></li>
            <li role="presentation"><a href="#closedReg" id="linkclosedReg" role="tab" data-toggle="tab">已结算挂号</a></li>
            <li role="presentation"><a href="#lastSettleInfo" id="linkLastSettledInfo" role="tab" data-toggle="tab">上一次结算</a></li>
        </ul>
        <div class="tab-content">
            <div role="tabpanel" class="tab-pane fade in active" id="registering">
                <div class="gridPanel" style="width:99%;">
                    <table id="registeringList" rel="MyTabGrid"></table>
                </div>
            </div>
            <div role="tabpanel" class="tab-pane fade" id="closedReg">
                <div class="gridPanel" style="width:99%;">
                    <table id="closedRegList" rel="MyTabGrid"></table>
                </div>
            </div>
            <div role="tabpanel" class="tab-pane fade" id="lastSettleInfo">
                <div class="gridPanel" style="width:99%;">
                    <table id="lastSettleInfoList" rel="MyTabGrid"></table>
                </div>
            </div>
        </div>
    </div>
    <div class="panel panel-default" style="margin-top:10px;">
        <div class="panel-heading navb-bg">
            应收
        </div>
        <div style="padding: 2px;padding-right:20px;">
            <table class="form">
                <tr>
                    <th class="formTitle">应收款：</th>
                    <td class="formValue">
                        <label style="color:red;">￥</label>
                        <label id="labysk"></label>
                    </td>
                    <th class="formTitle">实收款：</th>
                    <td class="formValue">
                        <input type="text" id="txtssk" class="form-control shortenWidth required" placeholder="不可为负数" />
                    </td>
                    <th class="formTitle">找零：</th>
                    <td class="formValue">
                        <label>￥</label>
                        <label id="labzl"></label>
                    </td>
                    <th class="formTitle">支付方式：</th>
                    <td class="formValue formDdlSelectorTd">
                        <select id="ddlzffs" class="form-control"></select>
                    </td>
                </tr>
                <tr>
                    <td colspan="3"></td>
                    <td class="formValue" colspan="3">
                        <lable>前一张发票：</lable>
                        <lable id="lblqfph"></lable>&nbsp;&nbsp;
                        <lable>总金额</lable>&nbsp;
                        <lable id="lblzje"></lable>&nbsp;&nbsp;
                        <lable>元,应收</lable>&nbsp;
                        <lable id="lblys"></lable>&nbsp;&nbsp;
                        <lable>,找零</lable>&nbsp;
                        <lable id="lblzl"></lable>&nbsp;&nbsp;
                        <lable>元</lable>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <input type="hidden" id="hidOrderId" value="0" />
</form>
<div class="gridPanel">
    <table id="InvoiceNoPanel"></table>
</div>

@Html.Partial("_BottomButtonsView", new Newtouch.HIS.Web.Core.Models.BottomButtonViewModel()
{
    ShowKeyList = new int[] { 4, 8, 9, 10 },
    F9Text = "退号"
})
<script type="text/javascript" src="@SiteUrl.GetStaticResourceScriptUrl("~/Content/js/OutpatientManage/OutPatient/OutpatientReg.js",false)"></script>
<script type="text/javascript" src="@SiteUrl.GetStaticResourceScriptUrl("~/Content/js/OutpatientManage/OutPatient/Registering.js",false)"></script>
<script type="text/javascript" src="@SiteUrl.GetStaticResourceScriptUrl("~/Content/js/OutpatientManage/OutPatient/ClosedReg.js",false)"></script>
<script type="text/javascript" src="@SiteUrl.GetStaticResourceScriptUrl("~/Content/js/OutpatientManage/OutPatient/LastSettleInfo.js",false)"></script>